The present network exposes more and more defects, and requirements of people on network performance are improved continuously. Therefore, researchers have to add multiple complicated functions to the structural system of a router, such as OSPF (Open Shortest Path First Interior Gateway Protocol), BGP (Border Gateway Protocol), multicast, differentiated service, traffic engineering, NAT (Network Address Translation), firewall, MPLS (Multi-Protocol Label Switching) and the like, which causes that exchange equipment such as the router is bloated more and more and the performance enhancing space is smaller and smaller. In 2008, Stanford University in America puts forward a concept of openflow network, and one basic openflow network comprises two control entities: a network controller at a control side and a switch at a forwarding side. The controller controls multiple switches by a standardized openflow protocol, and sends a flow table to the switch. The switch executes forwarding according to the flow table, and if no flow table item is matched, data message header information is packaged in a packet in message and is then sent to the controller for processing, and the controller sends a flow table item to guide forwarding according to an existing topological information computation path.
At present, under a software definition network environment, the controller is periodic, the link layer discovery mechanism is that the controller periodically (about 0.1 second) sends a link discovery message (same as link detection message and packaged in Packet-Out) for each active port of the switch, and the link discovery messages are sent are sent out from corresponding ports of the switch, such as a link layer discovery protocol (LLDP) message. The switch at the other end of the source switch queries the flow table after receiving the link discovery message, aiming at the link discovery message, the controller does not send the corresponding flow table in advance, and after the switch may not query a flow table matching rule, the switch uploads the message (Packet-In) to the controller. After receiving the message, the controller analyzes the message, the link detection message usually contains the identity and port number of the switch sending the message (source switch), and it contains the information such as identity, outlet port number and TTL of the switch if the message is a LLDP message. The controller may acquire one link according to the identity and port number of the switch (destination switch) uploading the message so as to construct a network topology.
After receiving each link detection message, the controller needs to analyze the message to acquire link information, and updates the timestamp of the corresponding link; if no link state is updated in a specified time interval, link failure is considered, and corresponding information is deleted, and the topology is updated. As the link is dynamically changed, the switch needs to upload each received link detection message to the controller so as to keep the timeliness of the network topology. A common link detection message is sent at the active port of each switch at a period such as 0.1 s, so the number of messages is very high. The link detection messages repetitively sent to the controller occupy more network bandwidth and consume more computing resources of the controller.